import request from '@/utils/request'

// 查询风险委托列表
export function listBusiness(query) {
  return request({
    url: '/system/business/list',
    method: 'get',
    params: query
  })
}

// 查询风险委托详细
export function getBusiness(id) {
  return request({
    url: '/system/business/' + id,
    method: 'get'
  })
}

// 新增风险委托
export function addBusiness(data, config = {}) {
  return request({
    url: '/system/business',
    method: 'post',
    data: data,
    ...config
  })
}

// 修改风险委托
export function updateBusiness(data, config = {}) {
  return request({
    url: '/system/business',
    method: 'put',
    data: data,
    ...config
  })
}

// 删除风险委托
export function delBusiness(id) {
  return request({
    url: '/system/business/' + id,
    method: 'delete'
  })
}
